<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set a constraint on a relation</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.dbplus-errno.html">dbplus_errno</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.dbplus-first.html">dbplus_first</a></div>
 <div class="up"><a href="ref.dbplus.html">DB++ 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.dbplus-find" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">dbplus_find</h1>
  <p class="verinfo">(PHP 4 &lt;= 4.1.0, PECL dbplus &gt;= 0.9)</p><p class="refpurpose"><span class="refname">dbplus_find</span> &mdash; <span class="dc-title">Set a constraint on a relation</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.dbplus-find-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><strong>dbplus_find</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$relation</code></span>
   , <span class="methodparam"><span class="type">array</span> <code class="parameter">$constraints</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$tuple</code></span>
   )</div>

  <p class="para rdfs-comment">
   Places a constraint on the given <em><code class="parameter">relation</code></em>.
  </p>
  <p class="para">
   Further calls to functions like <span class="function"><a href="function.dbplus-curr.html" class="function">dbplus_curr()</a></span> or
   <span class="function"><a href="function.dbplus-next.html" class="function">dbplus_next()</a></span> will only return tuples matching the
   given constraints.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.dbplus-find-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">relation</code></em></dt>

     <dd>

      <p class="para">
       A relation opened by <span class="function"><a href="function.dbplus-open.html" class="function">dbplus_open()</a></span>.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">constraints</code></em></dt>

     <dd>

      <p class="para">
       Constraints are triplets of strings containing of a domain name,
       a comparison operator and a comparison value. The
       <em><code class="parameter">constraints</code></em> parameter array may consist of
       a collection of string arrays, each of which contains a domain, an
       operator and a value, or of a single string array containing a
       multiple of three elements.
      </p>
      <p class="para">
       The comparison operator may be one of the following strings:
       &#039;==&#039;, &#039;&gt;&#039;, &#039;&gt;=&#039;, &#039;&lt;&#039;, &#039;&lt;=&#039;, &#039;!=&#039;, &#039;~&#039; for a regular
       expression match and &#039;BAND&#039; or &#039;BOR&#039; for bitwise operations.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">tuple</code></em></dt>

     <dd>

      <p class="para">
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.dbplus-find-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.dbplus-find-notes">
  <h3 class="title">注释</h3>
  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">此函数是<em class="emphasis">实验性</em>的。此函数的表象，包括名称及其相关文档都可能在未来的
PHP 发布版本中未通知就被修改。使用本函数风险自担 。</p></div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.dbplus-find-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.dbplus-unselect.html" class="function" rel="rdfs-seeAlso">dbplus_unselect()</a> - Remove a constraint from relation</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.dbplus-errno.html">dbplus_errno</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.dbplus-first.html">dbplus_first</a></div>
 <div class="up"><a href="ref.dbplus.html">DB++ 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
